package com.eternal.base.database.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.annotation.NonNull;
import androidx.room.TypeConverter;
import androidx.room.TypeConverters;

import com.eternal.base.data.source.BooleanConverters;

import java.util.List;


@Entity(primaryKeys = {"time", "mac"})
public class History {
    @NonNull
    public long time;
    @NonNull
    public String mac;
    public int tmp;
    public char hum;
    public boolean off;
    @TypeConverters(BooleanConverters.class)
    public List<Boolean> portStateList;

    public History(){}

    @Ignore
    public History(@NonNull String mac, long time, char tmp, char hum,List<Boolean> portStateList) {
        this.mac=mac;
        this.portStateList = portStateList;
        this.time = time;
        this.tmp = tmp;
        this.hum = hum;
    }
}
